<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML>
<html>
<head>
<base href="<%=basePath%>">

<title>试题管理</title>
<link rel="stylesheet" type="text/css"
	href="<%=basePath%>jslib/bootstrap/css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="<%=basePath%>css/theme.css">
<link rel="stylesheet"
	href="<%=basePath%>jslib/font-awesome/css/font-awesome.css">
<script src="<%=basePath%>jslib/jquery-1.7.2.min.js"
	type="text/javascript"></script>
</head>

<body class="content1">
	<div class="header">
		<h1 class="page-title">试题管理</h1>
	</div>
	<ul class="breadcrumb">
		<li><a href="index.html">Home</a> <span class="divider">/</span>
		</li>
		<li class="active">试卷列表</li>
	</ul>
	<div class="container-fluid">
		<div class="row-fluid">
			<%--
			 
				<form class="form-inline" method="post"
					action="servlet/RoleServlet?cmd=search">
					<input class="input-xlarge" placeholder="功能名称..." name="searchname"
						type="text">
					<input class="btn icon-search" type="submit" value="查询" />
					<a class="btn btn-primary"
						href="<%=basePath %>paper/showautoadd">新增 </a>
				</form>
				 
				--%>

			<div class="well">
				<form action="<%=basePath%>user/student/checkonepaper"
					method="post">
					${paperid } <input type="hidden" value=${paperid } name="paperid">
					<table class="table">

						<tbody>
							<tr>
								<td colspan="3"><h1>单选题</h1></td>
							</tr>
							<c:forEach items="${paper.singlechoose }" var="item">

								<tr>
									<td>题目</td>
									<td>${item.question }</td>
									<td>分值</td>
									<td>${item.point }</td>
								</tr>
								<tr>
									<td>选项</td>
								</tr>

								<tr>
									<td><input type="radio" name="singlechoose_${item.id }"
										value="A" checked> A.${item.a }</td>
								</tr>
								<tr>
									<td><input type="radio" name="singlechoose_${item.id }"
										value="B" checked>B.${item.b }</td>
								</tr>
								<tr>
									<td><input type="radio" name="singlechoose_${item.id }"
										value="C" checked>C.${item.c }</td>
								</tr>
								<tr>
									<td><input type="radio" name="singlechoose_${item.id }"
										value="D" checked>D.${item.d }</td>
								</tr>
							</c:forEach>



							<tr>
								<td colspan="3"><h1>多选题</h1></td>
							</tr>

							<c:forEach items="${paper.manychoose}" var="item">
								<tr>
									<td>题目</td>
									<td>${item.question}</td>
									<td>分值</td>
									<td>${item.point}</td>
								</tr>
								<tr>
									<td>选项</td>
								</tr>

								<tr>
									<td><input type="checkbox" name="manychoose_${item.id}"
										value="A">A.${item.a}</td>
								</tr>
								<tr>
									<td><input type="checkbox" name="manychoose_${item.id}"
										value="B">B.${item.b}</td>
								</tr>
								<tr>
									<td><input type="checkbox" name="manychoose_${item.id}"
										value="C">C.${item.c}</td>
								</tr>
								<tr>
									<td><input type="checkbox" name="manychoose_${item.id}"
										value="D">D.${item.d}</td>
								</tr>
							</c:forEach>



							<tr>
								<td colspan="3"><h1>填空题</h1></td>
							</tr>
							<c:forEach items="${paper.subblanks}" var="item">
								<tr>
									<td>题目</td>
									<td>${item.question}</td>
								</tr>

								<tr>
									<td>分值</td>
									<td>${item.point}</td>
								</tr>

								<tr>
									<td>请以英文状态下的分号进行分隔 （否则程序会误判） ;</td>
								</tr>
								<tr>
									<td><input type="text" name="subblank_${item.id}"></td>
								</tr>
							</c:forEach>
							
							
							<tr>
								<td colspan="3"><h1>简答题</h1></td>
							</tr>
							<c:forEach items="${paper.simples}" var="item">
								<tr>
									<td>题目</td>
									<td>${item.question}</td>
								</tr>

								<tr>
									<td>分值</td>
									<td>${item.point}</td>
								</tr>

								<tr>
									<td>请以英文状态下的分号进行分隔 （否则程序会误判） ;</td>
								</tr>
								<tr>
									<td><input type="text" name="simple_${item.id}"></td>
								</tr>
							</c:forEach>
						</tbody>
					</table>
					<input type="submit" value="提交">
				</form>
			</div>
		</div>
	</div>
</body>
</html>
